#*********************
#SCENE CREATION SAMPLE
# - Vegetation
#*********************

#-------------------------------------
#Import needed libraries
#-------------------------------------
import random

#------------------------------------
#Define vegetation creation functions
#------------------------------------
def createfeuillus():
	AddTerrain()
	first = CountObjects()
	ran = random.Random()
	namelist = ["08wMapleR","08vMapleY","08uMaple","07_Plum","08tmSummerCherry","08tnFallCherry","08toBlossomingCherry","09_Acacia","06_Fir","10_Coconut"]
	for i in range(0,20):
		p = AddPlant(namelist[ran.randint(0,9)])
		p.SetPosition(ran.randint(-150,150),ran.randint(-150,150),400)
	DeselectAll()
	SelectByType(VuePython.VOT_Plant)
	Drop()

def createfirsforest():
	#AddTerrain()
	first = CountObjects()
	ran = random.Random()
	for i in range(0,20):
		p = AddPlant("06_Fir")
		p.SetPosition(ran.randint(-200,200),ran.randint(-150,150),200)
	DeselectAll()
	SelectByType(VuePython.VOT_Plant)
	Drop()

#-----------
#Build scene
#-----------
createfirsforest()
DeselectAll()
SelectByType(VuePython.VOT_Plant)
SelectByType(VuePython.VOT_Terrain)
firs = Group()
firs.Move(-2000,0,0)
SelectAll()

#createfeuillus()
#DeselectAll()
#SelectByType(VuePython.VOT_Plant)
#SelectByType(VuePython.VOT_Terrain)
#feuillus = Group()
#feuillus.Move(200,0,0)

#------------
#Setup camera
#------------
DeselectAll()
SelectByType(VuePython.VOT_Camera)
cam = GetSelectedObjectByIndex(0)
cam.SetPosition(0,-500,18)
cam.SetRotationAngles(90,0,180)

#*************
#END OF SCRIPT
#*************